package patterns.proxy;

/**
 * Created by lenovo on 2016/11/28 0028.
 * Image的一个实现类，具体的图像类
 */
public class RealImage implements IImage{
    private String fileName;//文件名

    public RealImage(String fileName){
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    private void loadFromDisk(String fileName) {
        System.out.println("从磁盘加载图片："+fileName);
    }

    @Override
    public void display() {
        System.out.println("显示图片："+fileName);
    }
}
